package com.shiyanlou.upms.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
// 新导入的包
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
//权限管理系统用户实体类
@ApiModel(description = "用户实体类")
public class UpmsUser implements Serializable {
    //账号
    @ApiModelProperty(value = "账号", name = "userId", example = "123")
    private Integer userId;
    //用户名
    @ApiModelProperty(value = "用户名", name = "username")
    private String username;
    //密码MD5(密码+盐)
    @ApiModelProperty(value = "密码MD5(密码+盐)", name = "password")
    private String password;
    //盐
    @ApiModelProperty(value = "盐", name = "salt")
    private String salt;
    //姓名
    @ApiModelProperty(value = "姓名", name = "realname")
    private String realname;
    //头像
    @ApiModelProperty(value = "头像", name = "avatar")
    private String avatar;
    //电话
    @ApiModelProperty(value = "电话", name = "phone")
    private String phone;
    //邮箱
    @ApiModelProperty(value = "邮箱", name = "email")
    private String email;
    //性别
    @ApiModelProperty(value = "性别", name = "sex", example = "0")
    private Byte sex;
    //状态(0:正常,1:锁定)
    @ApiModelProperty(value = "状态(0:正常,1:锁定)", name = "locked", example = "1")
    private Byte locked;
    //@JsonFormat() 注解的作用是将字符串转化成 Date 时间对象的过程中，其中 pattern 表示时间格式，timezone 表示时区。
    //创建时间
    //@JsonFormat() 注解的作用是将字符串转化成 Date 时间对象的过程中，其中 pattern 表示时间格式，timezone 表示时区。
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @ApiModelProperty(value = "创建时间", name = "ctime")
    private Date ctime;
    //所属机构
    @ApiModelProperty(value = "所属机构", name = "organizationId", example = "123")
    private Integer organizationId;


    //构建方法
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt == null ? null : salt.trim();
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname == null ? null : realname.trim();
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar == null ? null : avatar.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public Byte getSex() {
        return sex;
    }

    public void setSex(Byte sex) {
        this.sex = sex;
    }

    public Byte getLocked() {
        return locked;
    }

    public void setLocked(Byte locked) {
        this.locked = locked;
    }

    public Date getCtime() {
        return ctime;
    }

    public void setCtime(Date ctime) {
        this.ctime = ctime;
    }

    public Integer getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(Integer organizationId) {
        this.organizationId = organizationId;
    }
}